﻿using Microsoft.Extensions.DependencyInjection;

namespace D.Wx.CacheUtils
{
    /// <summary>
    /// 提供 Redis 做缓存处理
    /// </summary>
    public static class MenberCacheUtil
    {
        /// <summary>
        /// 添加缓存中间件
        /// </summary>
        /// <param name="services"></param>
        public static void AddMemory(this IServiceCollection services)
        {
            services.AddMemoryCache();
            services.AddSingleton<ICacheService, MemoryCacheService>();
        }
    }
}
